require "common/Define"
require "FairyGUI"
require "FGUI/BagMainCtrl"

BagMain = {};
local this = BagMain;

function BagMain.Main()
	-- UIObjectFactory.SetLoaderExtension(typeof(MyLoader));

	Application.targetFrameRate = 60;
	Stage.inst.onKeyDown:Add(this.OnKeyDown);
	GRoot.inst:SetContentScaleFactor(1136, 640);

	BagMainCtrl:Awake();
	
end

function BagMain.OnKeyDown(context)
	-- body
	if (context.inputEvent.keyCode == KeyCode.Escape) then
		Application.Quit();
	end
end